package com.hatkisoft.LockFunction;

import net.rim.device.api.applicationcontrol.ApplicationPermissions;
import net.rim.device.api.applicationcontrol.ApplicationPermissionsManager;
import net.rim.device.api.ui.UiApplication;

import com.hatkisoft.LockFunction.listener.GlobalEventListenerOfLockApp;

public class LockFunction extends UiApplication {
	
	public static void main(String[] args) {
		LockFunction theApp = new LockFunction();
		theApp.enterEventDispatcher();
	}
	
	
	public LockFunction() {
		setPermissions();
		addGlobalEventListener(new GlobalEventListenerOfLockApp());
		
	}
	private void setPermissions(){
		ApplicationPermissions permissions = new ApplicationPermissions();
		permissions.addPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION);
		ApplicationPermissionsManager.getInstance().invokePermissionsRequest(permissions);
	}
	
	protected boolean acceptsForeground() {
		return false;
	}
}